// state
const state = {
	counting: false,
	countDownTime: 80000
};

// getters
const getters = {};

// actions
const actions = {
	startCountdownAction({
		commit
	}) {
		commit('SET_COUNT_DOWN_TIME_MUTATION', 80000);
		commit('SET_COUNTING_MUTATION', true);
	},

	stopCountdownAction({
		commit
	}) {
		commit('SET_COUNTING_MUTATION', false);
	},

	setCountdownTimeAction({
		commit
	}, params) {
		commit('SET_COUNT_DOWN_TIME_MUTATION', params);
	},
};

// mutations
const mutations = {
	SET_COUNTING_MUTATION(state, payload) {
		state.counting = payload;
	},

	SET_COUNT_DOWN_TIME_MUTATION(state, payload) {
		state.countDownTime = payload;
	},
};

export default {
	namespaced: true,
	state,
	getters,
	actions,
	mutations,
};
